package com.flyco.modules.returns.entity;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.*;
import com.flyco.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import com.flyco.poi.excel.annotation.Excel;

/**
 * @Description: 发货单表
 * @Author: flyco
 * @Date:   2023-08-10
 * @Version: V1.0
 */
@Data
@TableName("oms_send_out")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="oms_send_out对象", description="发货单表")
public class OmsSendOut {

	private Long partnerId ;

	@ApiModelProperty(value = "公司名称")
	private String companyName;

	@ApiModelProperty(value = "公司编码")
	private String companyCode;

	/**订单id*/
	@TableId(type = IdType.INPUT)
	private String id;
	/**memberId*/
	private Long memberId;
	/**couponId*/
	private Long couponId;
	/**订单编号*/
	private String orderSn;
	/**提交时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date createTime;
	/** 客戶类型:1-toC客户 5-toB客户*/
	private Integer customerType;
	/**用户帐号*/
	private String memberUsername;
	/**订单总金额*/
	private java.math.BigDecimal totalAmount;
	/**应付金额（实际支付金额）*/
	private java.math.BigDecimal payAmount;
	/**有效金额（实付金额-退款金额）*/
	private java.math.BigDecimal effectiveAmount;
	/**运费金额*/
	private java.math.BigDecimal freightAmount;
	/**促销优化金额（促销价、满减、阶梯价）*/
	private java.math.BigDecimal promotionAmount;
	/**积分抵扣金额*/
	private java.math.BigDecimal integrationAmount;
	/**优惠券抵扣金额*/
	private java.math.BigDecimal couponAmount;
	/**管理员后台调整订单使用的折扣金额*/
	private java.math.BigDecimal discountAmount;
	/**红包抵扣金额*/
	private java.math.BigDecimal redbagAmount;
	/**支付方式：ali->支付宝；wx->微信；union->银联*/
	@Dict(dicCode = "order_pay_type")
	private String payType;
	/**订单来源：pc->PC订单；app->app订单*/
	private String sourceType;
	/**下单的系统；smart智能终端,baisheng百胜os,shop门店, online新商城,admin后台下单，third三方平台*/
	@Dict(dicCode = "order_source_system")
	private String sourceSystem;
	/**下单时终端类型：pc/wap/ios/android/miniprogram*/
	private String sourceScreen;
	/**下单时的操作系统: window/mac/android*/
	private String sourceOs;
	/**下单的用户ip*/
	private String sourceIp;
	/**来源订单号*/
	private String sourceOrderSn;
	/**订单状态：0->待付款；1->待发货；2->已发货；3->已收货；4->已取消；*/
	@Dict(dicCode = "order_status")
	private Integer status;
	/**货品状态(0：不发货；1：锁定（默认）；2：等待下发；3：已下发；4：已发货；5：已签收；6：直接退货中；7：直接退货入库)*/
	@Dict(dicCode = "order_product_status")
	private Integer productStatus;
	/**支付状态；0：不支付；1：支付锁定；2：等待下发（默认）；3：已下发；4：已支付；(未支付：1、2、3，等待支付：2、3)*/
	@Dict(dicCode = "order_pay_status")
	private Integer payStatus;
	/**0:默认，1：部分退货，2：全部退货*/
	@Dict(dicCode = "order_return_status")
	private Integer returnStatus;
	/**订单类型：0->正常订单；1->秒杀订单*/
	@Dict(dicCode = "order_type")
	private Integer orderType;
	/**发货方式；1：不发货（虚拟单），2：快递，3：物流，4：客户自提*/
	private Integer sendType;
	/**售后类型：0：正常，1：退货，2换货，3退换货*/
	@Dict(dicCode = "order_return_type")
	private Integer returnType;
	/**物流公司(配送方式)*/
	private String deliveryCompany;
	/**物流单号*/
	private String deliverySn;
	/**自动确认时间（天）*/
	private Integer autoConfirmDay;
	/**可以获得的积分*/
	private Integer integration;
	/**可以活动的成长值*/
	private Integer growth;
	/**活动信息*/
	private String promotionInfo;
	/**收货人姓名*/
	private String receiverName;
	/**收货人电话*/
	private String receiverPhone;
	/**收货人邮编*/
	private String receiverPostCode;
	/**省份/直辖市*/
	private String receiverProvince;
	/**省份/直辖市编号*/
	private String receiverProvinceCode;
	/**城市*/
	private String receiverCity;
	/**城市编号*/
	private String receiverCityCode;
	/**区*/
	private String receiverRegion;
	/**区编号*/
	private String receiverRegionCode;
	/**详细地址*/
	private String receiverDetailAddress;
	/**订单备注*/
	private String note;
	/**确认收货状态：0->未确认；1->已确认*/
	private Integer confirmStatus;
	/** 挂起状态 */
	private  Integer lockStatus;
	/**挂起截止时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date lockTime;
	/**下单时使用的积分*/
	private Integer useIntegration;
	/**支付时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date paymentTime;
	/**支付确认人*/
	private String paymentBy;
	/**发货时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date deliveryTime;
	/**确认收货时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date receiveTime;
	/**评价时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date commentTime;
	/**修改时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date modifyTime;
	/**飞科支付单号*/
	private String flycoTradeNo;
	/**支付平台单号*/
	private String outTradeNo;
	/**外部来源类型：ad,cps,ref*/
	private String netSourceType;
	/**一级来源(keyname)*/
	private String netSourceArg1;
	/**二级来源(keysource)*/
	private String netSourceArg2;
	/**三级来源*/
	private String netSourceArg3;
	/**四级来源*/
	private String netSourceArg4;
	/**来源明细*/
	private String netSourceArgdetail;
	/**客服跟进状态：0/null：默认,1：跟进中，2：处理结束*/
	private Integer processStatus;
	/**客服跟进提醒时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date processRemindTime;

	private Date applyTime;
	private String applyBy;

	private Date updateTime;

	/**客服跟进标签*/
	private String processTag;
	/**公司发货地址ID(oms_company_address.id)*/
	private Long companyAddressId;
	/**门店编号*/
	private Long storeId;
	/**导购ID*/
	private Long salesId;
	/**导购名称*/
	private String salesName;
	/**删除标记*/
	@TableLogic
	private Integer cancelFlag;
	/**批次ID*/
	private String batchId;

	/**门店名称*/
	@TableField(exist = false)
	private String storeId_dictText;

	/**内购员工公司*/
	@TableField(exist = false)
	private String innerCompany;
	/**内购员工部门*/
	@TableField(exist = false)
	private String innerDepartment;
	/**内购员工名称*/
	@TableField(exist = false)
	private String innerName;

	/**内购员工名称*/
	@TableField(exist = false)
	@Dict(dicCode = "order_status_jx")
	private Integer statusJX;

	private Integer deleteStatus;

	private Long addressId;

	/**销售确认备注*/
	private String saleNote;

	private Integer channelId;

	/**销售确认备注*/
	@TableField(exist = false)
	private String channelName;

	@ApiModelProperty(value = "销售人员id")
	private Long saleUserId;

	@ApiModelProperty(value = "销售总监人员id")
	private Long saleOfficerUserId;

	@ApiModelProperty(value = "销售人员名称")
	private String saleUserName;

	@ApiModelProperty(value = "镇")
	private String town;

	@ApiModelProperty(value = "镇编号")
	private String townCode;

	@ApiModelProperty(value = "距离")
	private Integer distance;

	@ApiModelProperty(value = "联系电话2")
	private String phone2;

	@ApiModelProperty(value = "销售人员金蝶编号")
	private String saleJdCode;

	@ApiModelProperty(value = "客户编码")
	private String customerCode;

	@ApiModelProperty(value = "是否拆分了发货单，0无，1是")
	private Integer divideSendFlag;
}
